package com.oneToMany.self_way.model;

import java.util.HashSet;
import java.util.Set;

public class Category implements java.io.Serializable {

    private long id;
    private String name;
    private Set<Category>  childCategories = new HashSet<>();
    private Category parentCategory;

    public Category() {
    }

    public Category(String name, Set childCategories, Category parentCategory) {
        this.name = name;
        this.childCategories = childCategories;
        this.parentCategory = parentCategory;
    }

    public long getId() {
        return this.id;
    }

    public void setId(long id) {
        this.id = id;
    }
    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }
    public Set<Category> getChildCategories() {
        return childCategories;
    }
    public void setChildCategories(Set<Category> childCategories) {
        this.childCategories = childCategories;
    }
    public Category getParentCategory() {
        return this.parentCategory;
    }

    public void setParentCategory(Category parentCategory) {
        this.parentCategory = parentCategory;
    }

}


